import React from 'react';
import ReactDom from 'react-dom';
import { createStore, applyMiddleware, compose } from 'redux'
import thunk from 'redux-thunk'
import { Provider } from 'react-redux'
import { BrowserRouter, Route, Redirect,Switch } from 'react-router-dom'

import reducers from './reducer'
import App from './App'
import Login from './container/login/login'
import Test from './container/test/test'
import Register from './container/register/register'
const store = createStore(reducers, compose(
	applyMiddleware(thunk),
	window.devToolsExtension?window.devToolsExtension():f=>f
))

function Boss(){
	return <h2>BOSS页面</h2>
}


ReactDom.render(
	(<Provider store={store}>
		<BrowserRouter>
            <div>
				<Route path='/Login' component={Login}></Route>
				<Route path='/Register' component={Register}></Route>
				<Route path='/test' component={Test}></Route>
            </div>
		</BrowserRouter>
	</Provider>),
	document.getElementById('root')
)
